<template>
    <div class='security-container'>
        <div>
            <span>
                您的基础信息
            </span>
        </div>
        <ul>
            <li>
                <div>
                    会员账号:&nbsp; {{ memberVo.account }}
                </div>
            </li>
            <li>
                <div>
                    会员名称:&nbsp; {{ this.memberVo.nickname }}
                </div>
            </li>
            <li>
                <div>
                    会员等级:&nbsp; {{ memberVo.level }}
                </div>
            </li>
            <li>
                <div>
                    会员等级描述:&nbsp; {{ memberVo.note }}
                </div>
            </li>
            <li>
                <div>
                    登陆邮箱:&nbsp; {{ this.memberVo.email }}
                    <span @click="() => { this.$router.push({ path: '/member/updateEmail' }) }">
                        &nbsp;&nbsp;修改邮箱
                    </span>
                </div>
            </li>
            <li>
                <div>
                    绑定手机:&nbsp; {{ memberVo.mobile }}
                    <span @click="() => { this.$router.push({ path: '/member/updatePhone' }) }">
                        &nbsp;&nbsp;修改手机
                    </span>
                </div>
            </li>
            <li>
                <div>
                    修改密码:&nbsp; ********
                    <span @click="() => { this.$router.push({ path: '/member/forget' }) }">
                        &nbsp;&nbsp;修改密码
                    </span>
                </div>
            </li>
        </ul>
    </div>
</template>
<script>
// 导入组件
// 导出模块
export default {
    // 模块名字
    name: 'securitysetting',
    // 模块数据
    data() {
        //数据
        return {
            memberVo: [],
        };
    },
    // 注册组件
    components: {
    },

    methods: {

        async loadData() {

            let member = await this.$memberInfo()

            if (member !== null) {
                this.memberVo = member
                if (this.memberVo.mobile == null) {
                    this.memberVo.mobile = "您尚未设置登录手机";
                }
            } else {
                //
                this.memberVo.account = 'Nan'
                this.memberVo.email = '您尚未设置登陆邮箱'
                this.memberVo.nickname = '您尚未设置名称'
            }
        }
    },

    created() {
        this.loadData();
    }
}
</script>
<style scoped>
@import url("../../utils/css/securitysetting.css");
</style>
